<?php
/*
 * Created on 2008-5-9
 *
 * File:news.php
 * Author:David Meng
 * Site:http://www.systn.com
 * Email:mdchinese@gmail.com
 *
 */
	
	//编辑新闻
	$subject	= '特别鸣谢';
	$page_title = $subject.' -  修改';
	$type		= $action;
	$form_src	= 'action='.$action.'&todo=update';
	$from_button= true;		//显示编辑按钮
	$info		= $oBasic->getInfo($type);
	
		//添加数据
		if($todo=='update'){

			$error = post_check(
					array(
						'name'=>'提交内容',
						'data'=>$content
					)
			);


			//没有错误则写入数据
			if(!$error){
				
				$data = array(
					'content' =>$content
				);
				
				//编辑资料
					if ($oBasic->update($data,"type='$type'")){
						
						//更新缓存
						$oBasic->writeHtm($type,$subject,$model);
						
						msg('恭喜，操作数据成功!',$sys_page."?model=$model&action=$action",3);
					}else {
						msg('操作数据失败!');
					}
				
			}else{
				msg('操作数据失败!');
			}
		}
	
	
	$tpl->set_file('basic_page');
	$fpage = $tpl->r();
?>